/*
 * at_parser.h
 *
 *  Created on: 202211/7
 *      Author: yanghx
 */

#ifndef __AT_PARSER_H
#define __AT_PARSER_H

#include "stm32g4xx.h"
#include "at_error_code.h"
#include "commInterface.h"


#define AT_SPLIT_STR      ","
#define AT_TAIL_STR        '%'

extern unsigned char au8AtTxBuffer[BUF_AT_ITEM_SIZE];
extern uint32_t   g_u32Port;

void dbg_uart_init(void);
void at_rsp(uint32_t u32Port, const char* ps8Format, ...);
void at_transfer(uint32_t u32Port, const char* data,uint8_t len);
void process_at_cmd(uint16_t u16Port, uint16_t u16Len, char* ps8Buf);
int32_t copy_at_cmd(uint32_t u32Port, char* cmd_buffer, uint32_t u32Len);
void at_cycle_check_rsp(void);

#endif /* __AT_PARSER_H */